---
title: "Boleefattest"
output:
flexdashboard::flex_dashboard:
orientation: rows
social: menu
source_code: embed
---
```{r setup, include=FALSE}
library(flexdashboard)
library(dplyr)
library(ggplot2)
library(tibble)
```
Column {data-width=650}
-----------------------------------------------------------------------
### 各縣市學生上台大機率
```{r}
library(tibble)
library(dplyr)
library(ggplot2)
#2001-2003
df<-tibble(
section=c(
"台北市"
,"新北市"
,"高雄市"
,"台中市"
,"桃園市"
,"台南市"
,"彰化縣"
,"基隆市"
,"雲林縣"
,"新竹市"
,"宜蘭縣"
,"南投縣"
,"嘉義市"
,"屏東縣"
,"苗栗縣"
,"新竹縣"
,"花蓮縣"
,"嘉義縣"
,"台東縣"
,"金門縣"
,"澎湖縣"
,"連江縣"
),
percentage=c(3.41,
1.15,
1.4,
1.85,
0.62,
1.46,
0.41,
1.01,
0.35,
0.67,
0.52,
0.41,
0.83,
0.25,
0.22,
0.22,
0.25,
0.15,
0.16,
0.44,
0.12,
0.1)
,
number=c(1,1,3,2,1,
3,2,1,3,1,
4,2,3,3,1,
1,4,3,4,5,
5,5)
)
df$section = with(df,factor(section, levels=c(
"台北市"
,"新北市"
,"基隆市"
,"桃園市"
,"新竹市"
,"新竹縣"
,"苗栗縣"
,"台中市"
,"彰化縣"
,"南投縣"
,"雲林縣"
,"嘉義市"
,"嘉義縣"
,"台南市"
,"高雄市"
,"屏東縣"
,"宜蘭縣"
,"花蓮縣"
,"台東縣"
,"澎湖縣"
,"金門縣"
,"連江縣")))
picture<-ggplot(data = df)+
geom_bar(mapping=aes(x=section,y=percentage,fill=number),
stat="identity")+
labs(title='2001-2003')
picture
####################################################################
#2004-2006
library(tibble)
library(dplyr)
library(ggplot2)
df_04_06<-data.frame(section=c("台北市"
,"新北市"
,"高雄市"
,"台中市"
,"桃園市"
,"台南市"
,"彰化縣"
,"基隆市"
,"雲林縣"
,"新竹市"
,"宜蘭縣"
,"南投縣"
,"嘉義市"
,"屏東縣"
,"苗栗縣"
,"新竹縣"
,"花蓮縣"
,"嘉義縣"
,"台東縣"
,"金門縣"
,"澎湖縣"
,"連江縣"
),
percentage=c(3.71,
1.27,
1.62,
2.3,
0.77,
1.61,
0.51,
0.97,
0.31,
1.01,
0.67,
0.51,
0.97,
0.32,
0.2,
0.28,
0.33,
0.23,
0.23,
0.07,
0.28,
0.28)
,
number=c(1,1,3,2,1,
3,2,1,3,1,
4,2,3,3,1,
1,4,3,4,5,
5,5)
)
df_04_06$section = with(df, factor(section, levels=c("台北市"
,"新北市"
,"基隆市"
,"桃園市"
,"新竹市"
,"新竹縣"
,"苗栗縣"
,"台中市"
,"彰化縣"
,"南投縣"
,"雲林縣"
,"嘉義市"
,"嘉義縣"
,"台南市"
,"高雄市"
,"屏東縣"
,"宜蘭縣"
,"花蓮縣"
,"台東縣"
,"澎湖縣"
,"金門縣"
,"連江縣")))
picture_04_06<-ggplot(data = df_04_06)+
geom_bar(mapping=aes(x=section,y=percentage,fill=number),
stat = "identity")+
labs(title='2004-2006')
picture_04_06
#################################################################ˇ
#2007-2010
library(tibble)
library(dplyr)
library(ggplot2)
df_07_10<-data.frame(section=c("台北市"
,"新北市"
,"高雄市"
,"台中市"
,"桃園市"
,"台南市"
,"彰化縣"
,"基隆市"
,"雲林縣"
,"新竹市"
,"宜蘭縣"
,"南投縣"
,"嘉義市"
,"屏東縣"
,"苗栗縣"
,"新竹縣"
,"花蓮縣"
,"嘉義縣"
,"台東縣"
,"金門縣"
,"澎湖縣"
,"連江縣"
),
percentage=c(3.68,
1.37,
1.67,
2.19,
0.77,
1.7,
0.52,
1.14,
0.36,
1.2,
0.77,
0.52,
1.24,
0.28,
0.33,
0.48,
0.33,
0.36,
0.22,
0,
0.16,
0.59),
number=c(1,1,3,2,1,
3,2,1,3,1,
4,2,3,3,1,
1,4,3,4,5,
5,5)
)
df_07_10$section = with(df, factor(section, levels=c("台北市"
,"新北市"
,"基隆市"
,"桃園市"
,"新竹市"
,"新竹縣"
,"苗栗縣"
,"台中市"
,"彰化縣"
,"南投縣"
,"雲林縣"
,"嘉義市"
,"嘉義縣"
,"台南市"
,"高雄市"
,"屏東縣"
,"宜蘭縣"
,"花蓮縣"
,"台東縣"
,"澎湖縣"
,"金門縣"
,"連江縣")))
picture_07_10<-ggplot(data = df_07_10)+
geom_bar(mapping=aes(x=section,y=percentage,fill=number),
stat = "identity")+
labs(title='2007-2010')
picture_07_10
########################################################ˇˇˇ
#2011-2014
library(tibble)
library(dplyr)
library(ggplot2)
df_11_14<-data.frame(section=c("台北市"
,"新北市"
,"高雄市"
,"台中市"
,"桃園市"
,"台南市"
,"彰化縣"
,"基隆市"
,"雲林縣"
,"新竹市"
,"宜蘭縣"
,"南投縣"
,"嘉義市"
,"屏東縣"
,"苗栗縣"
,"新竹縣"
,"花蓮縣"
,"嘉義縣"
,"台東縣"
,"金門縣"
,"澎湖縣"
,"連江縣"
),
percentage=c(3.39,
1.25,
1.42,
2.11,
0.92,
1.72,
0.57,
1.03,
0.43,
1.25,
0.64,
0.6,
1.11,
0.35,
0.33,
0.63,
0.46,
0.4,
0.26,
0.27,
0.15,
0.35
),
number=c(1,1,3,2,1,
3,2,1,3,1,
4,2,3,3,1,
1,4,3,4,5,
5,5)
)
df_11_14$section = with(df, factor(section, levels=c("台北市"
,"新北市"
,"基隆市"
,"桃園市"
,"新竹市"
,"新竹縣"
,"苗栗縣"
,"台中市"
,"彰化縣"
,"南投縣"
,"雲林縣"
,"嘉義市"
,"嘉義縣"
,"台南市"
,"高雄市"
,"屏東縣"
,"宜蘭縣"
,"花蓮縣"
,"台東縣"
,"澎湖縣"
,"金門縣"
,"連江縣")))
picture_11_14<-ggplot(data = df_11_14)+
geom_bar(mapping=aes(x=section,y=percentage,fill=number),
stat = "identity")+
labs(title='2011-2014')
picture_11_14
```